Software zum Installieren eines Smart-Mirror Frameworks , zum Nutzen von hochschulrelevanten Informationen, auf einem Raspberry-Pi.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

12345678910111213
  1. import crypto from 'crypto';
  2. function sha1(bytes) {
  3. if (Array.isArray(bytes)) {
  4. bytes = Buffer.from(bytes);
  5. } else if (typeof bytes === 'string') {
  6. bytes = Buffer.from(bytes, 'utf8');
  7. }
  8. return crypto.createHash('sha1').update(bytes).digest();
  9. }
  10. export default sha1;