Java字符串映射成30位的哈希值要怎么实现

请问用Java怎么实现把身份证映射成30位的哈希值,
不知道怎么能转成固定长度,
求代码逻辑QAQ

纯新手哦,不知道行不行

String str = "230503200008270816";
int hash = str.hashCode()>>>2;
System.out.println(hash);
System.out.println(Integer.toBinaryString(hash));