public static Memory sha1(Environment env, Memory value, boolean rawOutput) {
        MessageDigest md = sha1Digest.get();
        md.reset();
        md.update(value.getBinaryBytes(env.getDefaultCharset()));
        if (rawOutput) {
            return new BinaryMemory(md.digest());
        } else {
            return new StringMemory(DigestUtils.bytesToHex(md.digest()));
        }
    }
Parses the cslashes bitmap returning an actual bitmap.

@param charset the bitmap string

@return the actual bitmap
exts/jphp-zend-ext/src/main/java/org/develnext/jphp/zend/ext/standard/StringFunctions.java