SHA1 Encrypt Pro



Live Mode Switch




Related Pages: MD5 Encrypt, SHA256 Encrypt, SHA512 Encrypt.

About SHA1 Encrypt Pro:

This pro online sha1 encrypt tool helps you to encrypt one input string into a fixed 160 bits sha1 String.

Paste your Input String or drag text file in the first textbox, then press "SHA1 Encrypt" button, and the result will be displayed in the second textbox.

More information about SHA1:

RFC 3174: https://tools.ietf.org/html/rfc3174

Python Implementation of SHA1 (hashlib): https://docs.python.org/3/library/hashlib.html

Java Implementation of SHA1: https://docs.oracle.com/javase/7/docs/api/java/security/MessageDigest.html

PHP Implementation of SHA1: http://php.net/manual/en/function.sha1.php

SHA1 Generator with Python (with package hashlib):

import hashlib

def sha1_generator(str):
    m = hashlib.sha1()
    m.update(str.encode())
    return m.hexdigest()
    

SHA1 Generator with Java (with package MessageDigest):

import java.math.BigInteger;
import java.security.MessageDigest;

public String generate(String str){
    MessageDigest md = MessageDigest.getInstance("SHA-1");
    md.update(str.getBytes());
    byte[] digest = md.digest();
    String result = new BigInteger(1, digest).toString(16).toUpperCase();
    return result;
}
    

SHA1 Generator with Linux (with OpenSSL):

[email protected]:/var/log/apache2# openssl dgst -sha1 access.log
SHA1(access.log)= dcf947a7c318007b8620d112a62cc7b1a7ea4eda