EVOLUTION-MANAGER
Edit File: sha1.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>R: Calculate a SHA1 hash of an object</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="R.css" /> </head><body> <table width="100%" summary="page for sha1 {digest}"><tr><td>sha1 {digest}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Calculate a SHA1 hash of an object</h2> <h3>Description</h3> <p>Calculate a SHA1 hash of an object. The main difference with <code>digest(x, algo = "sha1")</code> is that <code>sha1()</code> will give the same hash on 32-bit and 64-bit systems. Note that the results depends on the setting of <code>digits</code> and <code>zapsmall</code> when handling floating point numbers. The current defaults keep <code>digits</code> and <code>zapsmall</code> as large as possible while maintaining the same hash on 32 bit and 64 bit systems. </p> <h3>Usage</h3> <pre> sha1(x, digits = 14, zapsmall = 7, ..., algo = "sha1") ## S3 method for class 'numeric' sha1(x, digits = 14, zapsmall = 7, ..., algo = "sha1") ## S3 method for class 'complex' sha1(x, digits = 14, zapsmall = 7, ..., algo = "sha1") ## S3 method for class 'Date' sha1(x, digits = 14, zapsmall = 7, ..., algo = "sha1") ## S3 method for class 'matrix' sha1(x, digits = 14, zapsmall = 7, ..., algo = "sha1") ## S3 method for class 'data.frame' sha1(x, digits = 14, zapsmall = 7, ..., algo = "sha1") ## S3 method for class 'array' sha1(x, digits = 14, zapsmall = 7, ..., algo = "sha1") ## S3 method for class 'list' sha1(x, digits = 14, zapsmall = 7, ..., algo = "sha1") ## S3 method for class 'pairlist' sha1(x, digits = 14, zapsmall = 7, ..., algo = "sha1") ## S3 method for class 'POSIXlt' sha1(x, digits = 14, zapsmall = 7, ..., algo = "sha1") ## S3 method for class 'POSIXct' sha1(x, digits = 14, zapsmall = 7, ..., algo = "sha1") ## S3 method for class 'anova' sha1(x, digits = 4, zapsmall = 7, ..., algo = "sha1") ## S3 method for class 'function' sha1(x, digits = 14, zapsmall = 7, ..., algo = "sha1") ## S3 method for class 'formula' sha1(x, digits = 14, zapsmall = 7, ..., algo = "sha1") ## S3 method for class ''('' sha1(...) sha1_digest(x, digits = 14, zapsmall = 7, ..., algo = "sha1") ## S3 method for class 'NULL' sha1(...) ## S3 method for class 'name' sha1(...) sha1_attr_digest(x, digits = 14, zapsmall = 7, ..., algo = "sha1") ## S3 method for class 'call' sha1(...) ## S3 method for class 'character' sha1(...) ## S3 method for class 'factor' sha1(...) ## S3 method for class 'integer' sha1(...) ## S3 method for class 'logical' sha1(...) ## S3 method for class 'raw' sha1(...) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>x</code></td> <td> <p>the object to calculate the SHA1</p> </td></tr> <tr valign="top"><td><code>digits</code></td> <td> <p>the approximate number of significant digits in base 10. Will be converted to a base 16 equivalent. Defaults to <code>digits = 14</code>, expect for sha1.anova where <code>digits = 4</code></p> </td></tr> <tr valign="top"><td><code>zapsmall</code></td> <td> <p>the approximate negative magnitude of the smallest relevant digit. Will be converted to a base 2 equivalent. Values smaller than this number are equivalent to 0. Defaults to <code>zapsmall = 7</code></p> </td></tr> <tr valign="top"><td><code>...</code></td> <td> <p>If it is the only defined argument, passed to another <code>sha1</code> method. If other arguments exist, see Details for usage.</p> </td></tr> <tr valign="top"><td><code>algo</code></td> <td> <p>The hashing algoritm to be used by <code><a href="digest.html">digest</a></code>. Defaults to "sha1"</p> </td></tr> </table> <h3>Details</h3> <p><code>sha1_digest()</code> is a convenience function for objects where attributes cannot be added to apply the <code>digest()</code> function to its arguments. <code>sha1_attr_digest()</code> is a convenience function for objects where objects can be added to generate the hash. If generating hashes for objects in other packages, one of these two functions is recommended for use (typically, <code>sha1_attr_digest()</code>). </p> <p>Extra arguments: </p> <p>environment: An optional extra argument for <code>sha1.function</code> and <code>sha1.formula</code> should be TRUE, FALSE or missing. <code>sha1.function</code> and <code>sha1.formula</code> will ignore the enviroment of the function only when <code>environment = FALSE</code>. </p> <h3>Note</h3> <p><code>sha1</code> gained an <code>algo</code> argument since version 0.6.15. This allows <code>sha1()</code> to use all hashing algoritms available in <code>digest()</code>. The hashes created with <code>sha1(x)</code> from digest >= 0.6.15 are identical to <code>sha1(x)</code> from digest <= 0.6.14. The only exceptions are hashes created with <code>sha1(x, algo = "sha1")</code>, they will be different starting from digest 0.6.15 </p> <p>Until version 0.6.22, <code>sha1</code> ignored the attributes of the object for some classes. This was fixed in version 0.6.23. Use <code>options(sha1PackageVersion = "0.6.22")</code> to get the old behaviour. </p> <p>Version 0.6.24 and later ignore attributes named <code>srcref</code>. </p> <h3>Author(s)</h3> <p>Thierry Onkelinx</p> <hr /><div style="text-align: center;">[Package <em>digest</em> version 0.6.25 <a href="00Index.html">Index</a>]</div> </body></html>