SHA1Digest hash = new SHA1Digest();
hash.update(msg, 0, msg.length);
byte[] data = new byte[hash.getDigestSize()];
hash.doFinal(data, 0);
byte[] tmp = new byte[data.length + ASN_SHA1.length];
System.arraycopy(ASN_SHA1, 0, tmp, 0, ASN_SHA1.length);
System.arraycopy(data, 0, tmp, ASN_SHA1.length, data.length);