MessageDigest Test & SHA KeyΒΆ

Note

You can find these scripts inside the folder pmis/STND_PMIS/test/console/example.
If you want to execute them, you can use the Jython Console from the devtool menu.

filename => ex14.py

from java.security import MessageDigest
from org.apache.commons.codec.binary import Base64

digest = MessageDigest.getInstance("SHA-1")

digest.update(String('1234').getBytes("UTF-8"))

key = Base64.encodeBase64String( digest.digest() )

print key